Refactored a few chunks. Removed unecessary files and added comments for readability.