requestAnimationFrame implemented

Separated rendering from input