Cleaned and commented version of orderedincorporator