Moved everything into an object