Fixes #154
Fixes #155
Fixes #140
Merge branch 'refactoring/input' into develop