Hacking together a basic framwork