Added a finalise() function to Container to fix errors. Also added unit tests etc.