Redesigned to use compile time table structures.