Enforce thread safety at the type level

Closes #97
Update examples