finished mainAjax, mostly. testing
small fixes