Removed unused plotting code
Minor reformatting