(Bug 110) Initial import of old backend patch
(Bug 110) Clean up stuff
(bug 110) Add final frontend bits.