Merge rrestruct back to master

restruct branch is functional, can be used as starting point for further development!