Work on class checking

- some work on class checking
- segfaults...