Merge pull request #11 from SaveTheRbtz/master

New API, rwlocks and bugfixes