#3 Fix code style. Rename a function. Fix tests run from command line.