Fixes #18 #20 #34 #35