Improved some code quality