Divided code so it is much better organized and easier to read and maintain