Refactor a few dynamic methods

Make sure that most of the important code is stored in a regular method and not in dynamic methods. This adds a level of complexity we don't need.