Refactor. Add XHR error handling
Fix invocation bug. CSS cleanup.