Rearranged file structure and added more comments