re-added the unified input - fixes

re-added all changes to a new clean branch. This should merge now