Fix #19,#20; #13 in progress