Break up files and clean up some of the implementations. Also added bundler support for required gems.