cleanup, fixed and cleared code samples