Improve documentation and write algo

Uses the slice struc power avoid keeping pointer values.
Improve documentation.
Fix sync issues

Using the Cond struct with the RWMutex leads to strange locking/waiting.
Now it uses two separate locks for the wait/signal and read/write.