WIP: Use prefix trees instead of hashmaps