Commited further refactoring