add logging and some cleanup
better chapter parsing