Add documentation and refactor coiltap code base