Missed a parenthesis
Moved the plotting functions back