Fix some quality code issues