Add id() and is_a() functions to entity_instance class
Make filename argument to open() function optional