Phase 1 Check In

Functional tests and working code for phase 1