added chapters as seperate files and a number of changes