Refactored code to be better organized and introduced some new code for Cristian Groza to work on.