Deleted stupid method isEmpty() and cosmetic.
Changed locking mechanism to more general interface lock.