Cleaned up code. Changed timer mechanics.