Updated code contracts