Refactoring and ready for publish.