Further small refactorings over existing methods. Added a new static class.