The initial consolidation

I'll port over changes from my fork here.  In the end we'll have a single apk that can work will the most common backends.

Going to try doing the most minimal amount of work here., additional cleanup will come later.