Fixed some best practices related issues