Refactoring

Cleaned up brick type lookup, text rendering, and other duplication/mess