code refactoring: integration with Shelf