Migrated to proper h/cpp definitions.

It reduced our binary size in half - from 2 MB to less than 1 MB.