Ajax added in various places, bug fixes