added logging and ajax framework