STI Add support for rebuilding documents

Adds rebuild support for STI models #59 #186
@elbouillon thanks for working on tests.