Refactoring of feature extraction and visualization stuff