Implemented puzzle solving control. Reformatted.