add timing to terrain loading, made some minor optimizations