Complile and doc fixes