Some refactoring and added a test