Some code clean up

This merge request solves all warnings from the androidstudio inspection "too complex methods".