initial port

lots of updates, simplifications for mobile. still have lots to do