Move puzzle logic over to own file.