finished initial implementation -- need to handle optional and required keys somehow

@blakewatters @segiddins Can you guys review this first go? Much appreciated.