Added plain C serial code

Also got rid of dependencies on libstdc++ and various other bloat.

Signed-off-by: Morten Hustveit <morten.hustveit@gmail.com>