Made Player object and made it time based

And lots of code cleanup.