added class Spaces with all methods from console app's