restructured code

code is prettier, correct pinouts initialized