Fixed and cleaned up some things