Moved logic to Hash class
Added namespace
Removed namespaces and moved logic to separate classes