Added and integrated GameLoop and refactored