Code cleanup and directory/file structure organization