Refactor - better organized and fixed typos