Moved some things to object oriented syntax