Various fixes, WIP.