Enabled O3 optimization.

Simplified client code a lot.