Refactor base class

Also add a bash script to run a bunch of stuff.  This would be work for Travis CI.