Improve chapter script