Fixes #2378 Added Minitest and other code cleanups