Bug fixes and removed unnecessary files