Fixes #147. Fixes #148. Fixes #149