Cleaned up some code w/ comments