Refactored core classes