removed android specific calls and some old code.