add some more tests for Apc
improve sgr handling structure
add dcs tests