Several improvements

Several improvements