Some refactoring due to integration with composer