nitvm: Improve construction of runtime structures