fixes for android build. not running yet.
small cleanups and cosmetics.