Zaslat SMS: Beam-based correction and optimization for accelerators /