Rebuilt to use maps in order to have cheaper lookups for addresses/handlers