misc: Reorder sources in util/tlm and rewrite build scripts