Tidy up build_tables function
Tidy up first_symbols function