Topic/bounded controls: cleaned up branch ready.

This is a cleaned up version of the old branch bounded-controls. It fixes #1252.