code cleanup / refactoring
Merge branch 'origin/master'