Fixed compiler warning/error and added captions to plots