Some fixes to improve readability of code