improvements and refactoring, feature activation checking