Make the code work and add a basic test case.
Also add the ablity to trace function calls by configuring --enable-trace.