some improvements
Merge branch 'cleanup'