A few tweaks and improvments