Organized and documented the code