[Refactor] Make long methods shorter
Merge pull request #1402 from jonas054/shorter_methods

Shorter methods