Fixes to buffer getters/setters
Add garbage collection for thread pointers, fixes memory leak.
Investigate further for improved performance
Cleanup output of debugging info
Fix bug introduced in commit 979323c6
Merge branch 'refs/heads/master' into RAW-native