Cleanup

main change is to exceptions, the rest is renaming and such...