A few small changes..

.. to make this thing look more like an OTP application and be compilable by 'rebar'.

I did not touch the C sources yet.