Fixed bug in display pin numbers, misc coding style improvements