Oops, didn't include the Solution or Chamber classes in previous
commits! Also minor refactoring and bugfixing.