commiting local LD changes
 added debug clauses to main.py
Fixed pins.
testld: fixed unit tests.
ld: Fixed errors and failed tests.
ld: added missing code.