Use weak-memory hash/map tables (instead of mutable arrays)

Should be slightly more efficient and less prone to array indexing
errors.

Signed-off-by: Stephen Celis <stephen@stephencelis.com>
Remove unused method

Signed-off-by: Stephen Celis <stephen@stephencelis.com>