Removed unused files. Some bugfixes.