Add installation instructions, and code explanations, and clean up comments. Simplify plotting and add external run option.