Several improvements. WIP.