provided api_key getter, added api_key existance check, removed some stupid stuff