More code for new codebase.

Contains:
  - functioning buttons to add files and directories (including
    drag'n'drop).
  - internal routines for file lists etc.