Cleaned up file structure and added comments