Cleaned up style and syntax.