Done refactoring to separate mid/high levels. This fixes #6.
There're some issues, but I don't know the reason currently.