use https for ajax requests now so that it can work on https pages. also fixed some other things.