Some refactoring...again