Create picodb.c

Unfinished, still needs overall optimization and signal handling