The previous two commits close #187, close #226