Did some refactoring, makes me happy :)