Huge fixes

Removed a series of dumb design choices and typos.

Improved speed of wildcard lookup.