Added commentary and changed file structure