Closes #18, #19, #20.