Refactoring classes, adds missing features.