more THUMB, better debugging, loops handling