buffer length checks and readme updates