Added pin details and many bug fixes