Bug fixes
writereadData is a bool; readAFL has to be bool
other minor changes.