[wp8] code clean up and improvements.