Added video display and square detection (not working the best)