code formatting, and swap to using internal date member of clock object - which avoids trying to instantiate a module during module load time