I am an idiot. Now working more or less correctly.