Added some minor improvements into code quality