Code cleaning and refactoring.
Merge branch 'origin/master'