Cleaned up code to project guidelines.