bug fix: reinstated the @dirty_flag statements, made records() updateable from a block and added an MIT license.