A few tweaks

I made some minor changes to the code