Cleaned up some code and changed private fields to use _