Added plotting routine for cpickle gain solutions and did some general cleaning up