Added Kevin's changes and did some other things