Added instruction numbers
Logging, variable rearrangement
merge upstream; fix port in use warning; new logger API