Made a lot of changes to valve class, including a timer