refactored pins controller. unnecessary code generated from scaffold commented out