Cleaned optparse for demo and api_server.

Removed explicit `dest` arguments and the dictionary vars() hack in favor of direct and explicit arguments.