Moved main to a better place