Switch main API methods to take keyword params; improve dialog handling