Changed Input Handling

- Changed the way the input are handled in order to get a fluid game
- Added mainLoop ( a game must-have )