Cleaned up some of code and standardized names.