Lock instances are stored in a weak reference map. This way they will be garbage collected if they are not in use #1
More improvements and fixes to code and memory management #1
Enables compile on save for NetBeans