Added the class files, small bugfixes