Implemented async javascript method calls to prevent UI blocking.