Support for collection class definition

Also includes some whitespace fixes