refactor reference name mangling, changed folder layout, minor features
adds shellargs argument
various fixes