Cleaned up a bunch of code. Added a timer component