optimizations and other minor things
added some code to test realtime control of SID parameters