Somewhat working. Now the code needs a little bit of cleaning and
organization ... to remove the junk.