Updated wiring config

and conformed the code