Cleaning up the code, removing uneeded attributes. Corrected bug in chapter ordering.