Made better encoder testing and fixed encoder ports