add note class, and other improvements.