code cleanup; support multiple stations, stokes and pols