Refactor pins setting

Store pins in array for easier management