Various fixes & improvements.