fixed some loader image issues
made the core:doc() function deduplicate documents
some fixes and rewriting of controller rules