Final version. With docs