Revert part of 0733d93b, which removed a descriptive comment for a complicated function and mixed feature processing and feature generation.