Implementation of #137 #152 #176 #177 #178 #180