The data structure of nodes, elements and loadings have a lot of memory leaks. This should be implemented by using std-container classes.