Address issue #108

This should address most of #108. I haven't added tests yet, and it doesn't cover the entire status API, but I should be able to add those soon.
Missing thread locking.