Adding missing dependencies.

Fixing file type checking functions.
Fix sleepy mistake of making arrays instead of objects.