Initial work done. Looks ugly, but meh.