Non-working commit. Views and queries have to be sorted out.

Refactoring.

For saving, will squash.
Fixed major issue regarding redirects.
Basic working crawl upload. File upload to follow.
Branch now working completely.