Fix a couple of bugs, use sbt and run as a standard test