Cleanup of Code and Small Aesthetic Changes