markup cleanup
adding frontend XHR service
added some backend stuff in addition to frontend. Merging into backend.