lots of bug fixes & refinements

(also includes pg 2.9 for android… need to clean this up)