Code Clean Up

Cleaned up the code a bit.