First commit with bit of refactoring