Fixes #10-12, #17, #19-23. Thanks so much to @pfaffman for the incredibly detailed feedback!