Refactor files(...) function.
Refactor build(...) function.