Removed unnecessary files; refactored code