Added timer functionality, but its buggy right now.