Refactored a little bit.
Even more refactoring.