ajax for adverts, bug fixes