added key controls for reset, pause, rendering. minor refactoring