Work on #584 #585 #586 #587