Refactoring

> Originally at https://github.com/kevin-brown/mousetrap/pull/1

This is the pull request that will be used for code review, tracking progress, and eventually generating the patch set for this refactoring.
We'll burn that bridge when we get there. The important thing is to isolate OpenCV. That way we can easily figure out how to port it to v3.