Resolves #18, #19, #20.