Switch to c-style api calls.
Fix release build configuration.
Show stats on preview