Complete rewrite and new functionality.
Complete rewrite and new functionality.