Started work

Started initialization routine.

Broke the code into Slave and Master routines which can be excluded at
compile time if need be.