Fixed code style and clean up