Working on #1617.. Almost working, needs style-fixes.