feature/multiprototypes

ready for review and potential merging.