Various fixes, improvements.