bugfixed and cleaned up files