Improved use of monitors via wait() and notify() and remove superfluous code
Merge pull request #29 from OldSneerJaw/improve-monitor-handling

Improved use of monitors