First stab at a working skeleton. Definitely needs more time and break down.