Moving thread name to the thread class

because that's better organisation
Creating a namespace for memory utilities

because that's better organisation