Change apikey handling.

minor cleanup