Fixed duplicated { bug. Removed XHR checking from code.