Remove unecessary files and refactor