Refactored as standalone package