some fixes here and there
added the last chapter
fixed some warnings