Moved main into object