Implemented more ensure contracts.