General optimizations and corrections to work with new ajaxing style

Signed-off-by: Michael 'Tekkla' Zorn <tekkla@tekkla.de>