Re-wrote code to use polymorphism. It's now cleaner and more modular