Added incredibally basic framerate limiter, threading and a rendering
context.