bugfix: added missing break
improvement and restructure
add missing classes