Cleaned up some code.
Merged