create a scope for class definitions

- fixes #33 and #35