Switched to an object oriented design