Have a look through the recent discussion on Episode 161. That discussion covers working with spaces for window management.