Spaces class

added Spaces.h and made some more cap fixes