Added to_hash method which loops through all the singleton methods that were created and creates a hash object.