Refactoring and check classes