Major refactoring to checks. Encapsulation of settings.