Lots of testing and bugfixing. Generates elements without bugs. Need to check if elements are correct. MAR