Making some big changes to internals, cleaning up some vars