Cleaned up and optimized some code.