Added thread safety
Simple Clean-Up
Added additional use cases (see lines 83-90)