Pin configuration & Assorted bugs fixed