011_codejam: some minor refactoring and addition of constraints to get it to verify.