Refactor android app especially network code.