Refactored into new package