Redoing a bunch of the base functionality. This branch dose not work, please use the master branch.