Multiple changes to make feature extraction easier and better documented.