Refactor source format