Started to implement the real main

Started to create the real main, which does not have all the debug
stuff, and will handle the file as intended.
Added slight optimisation to hough and fixed counting of holes for
certain quadrangles