Giant mess, just to see if works. Rebase later.