Added notes and asserts.