Add settings sample code and cleanup grade sample code.