Even more cleanup and stupid removing. Add better utility functions,
make a little more generic.