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.
Merge pull request #6 from mirego/feature/internal-refactor

Refactor a few dynamic methods