Amended based on comments from last commit.