Plugin rewrite.

Add maven build file.

Rewrite just about everything other than Metrics.