fixes #2378 - added Minitest and other code cleanups