Split helpers.js into multiple files.

File system scanning now works.
Re-organised callbacks.