Few logical improvements