Fixed pin assignments; Added A and B pin assignment toggling