Untested complete first version

Completed version 1. Needs onsite testing.