Fixes

some style fixes, some improvements and forgotten remarks.. ready to merge whenever you are, @pqwy