Now it seems to actually work. Still need to work on generation.