Refactored into source directory