This is working now, more or less. Need to add an installer and make it a bit more sensible