clean up style and syntax