Made minor changes to get the new time module working

Fully tested and functional. Didn't show the improvement I was hoping for,
although it was a very lightweight test and wasn't very thorough. It
should be more efficient and safer, so I will keep it.