Update comments, write tests