Refactored into files