Wrote hours class and moved most of the functionality to it