Bugfixes/Ajax features

Includes a bugfix for my last PR and ajax related fixes.