refactor proposal code

This refators some hardly used proposal code. It removes some routes which lack implementation and refactors some templates.