added new context processors and cleaned code