Cleaned up previous pull request a bit and added some commentary