Move chapter tracking into own module.