Optimize build and add some TCM stuff. Experimental.