Several polishments and minor fixes