Fixed time reporting

When the class opens/closes time is properly displayed. Also optimized
some of the code.