Cleaned up code contracts