Added more stuff from CAF (jb_chocolate) and fixed some errors