Cleaned up some of the code so it is more presentable.