Code cleanup
Merge branch 'refactoring'