Make require files relative
Refactor format method