Removed Redundant Code and better formatting.
Added test for checking thread safety.

The test checks for thread safety in retrieving the list of instances of a particular type.
Added thread safe count and getInstances function

The functions are countInstancesSafely( string type ) and getInstancesSafely( string type )
Commented on which step file was used in the test