more fixes... improving code quality