Move  hours processing functions into package

Move the hours processing code into a package and the testing code into
a package.
Futher seperate the hours processing code from the potential UI code.