Refactor src/head