fix const correctness
starm_start: implemented
move generic stuff to appropriate place