Various changes to fix Android compatibility, display order etc.