Chapters added and some life cycle methods added.