Small legend fix and removed print statements in some places.