reworked Types to support STM

- deadlocks somewhere...
changed TMVar to TVar

- compiles & runs again
Merge branch 'STM'