clean up and code formatting
adding refresh cache on update and insert