Add documentation and make code more consistent