Implementing solution construction, and minor bug fixing