Minor modifications on code style and Some other cleanups