stage 2

Much of the final functionality in place, some stylistic changes to be
made