Pulling draw stuff out of demo, into real code

More work on #11