Raised threshold. Removed div/0 bug. Separated plot into path and template.