(mostly) Base code that Chris gave me for starting out.
Implemented my half of the deal, partly.