refactor main code into a 'World' class