Added king safety and check checks.