Cleaned up some old stuff, added comments.