Heavy refactoring.  Brought in some dependencies to prune them down.