added mechanism to preload the mongoengine documents
removed redundent includes
fixed label check
should use raise HTTPFound not pylons redirect
fixed wrong comparision