fixed bugs and added style
Merge remote-tracking branch 'origin/master'