Remove mutex and simplify dimension handling

Lookups are now done via a slice where possible.