Added corner tracking code by Thomas. May work for some people.