Refactoring, cleaning

Fix #7