add comments
lots of minor fix (warning)
Merge remote-tracking branch 'origin/dev' into dev