added support for foreign keys and removing containers