added some style changes and comments