Refactor: Move the metrics to its own package.
Remove unused imports.
Merge pull request #20 from eric-wu/master

More refactoring: Move the metrics to its own package.