Added optional key to initializer so lookups can be done by any key