Switched giant update/insert block to drupal_write_record() calls. Added permission specific to managing this module. Tidied up some comments
