Added observation register handling

Observation register handling is added. Pins changed and unused code
deleted.