I have cleaned up the code, provided for a live preview, and run through the code looking for coding style violations.
I have also created a ticket, with the latest patch attached: https://dev.haiku-os.org/ticket/7445The changes total 2369 lines and there is no static preview image anymore, so the file is ~50KB.
Thanks all!