Removed std namespace and split into separate .h and .cpp files.