Some refactoring and new approaches