fixed flag setting, implement SH/RO instructions, cleanup

add some comments, remove unused headers, add TODOs etc