API machinery in place and command line interface improved

commit 567f281b627de030f4865e73f7dcf2d183b3dd66
Author: Michael Marconi <michael@modeltwozero.com>
Date:   Sun Jan 13 19:58:45 2013 +0000

    API machinery in place