Also these if-else-blocks could move to methods on their own

This subpartitioning of the rather large function would make the way it works easier to understand