Added support for permanent ID's in database [Issue #2]