changed collation, split up class definition to separate files