All done. Slightly buggy, but works well enough