Cleaned up some stuff and fixed a couple of bugs