Changed const char* to std::string
Added basic hash computing
Added basic duplicate detection
Added exception handling