Added urlencode to querys & fix createKey api