Added corner detection