Cleaing up the code to make everything more Object-y