Fun while it lasted
Safety improvements, switch to HashMap instead of TreeMap
Update unit test