some refactor.
consolidated ajax requests by using one request method. removed some unnecessary stuff. changed some names.
made some object members "private" seeming with underscores preceding attribute or method name.