Fixed some problems with logical methods. Imporved documentation of logical functions.