Proposal cleaning

not yet ready for merge, need real testing and also automatic tests. More for discussion of design.
good catch, my fault.