Added configurable typing speed and cleaned up code a bit