Moved plotting to its own file