fixed lots of bugs
removed some unnecassary files