[Primo] Clean-up

Cleaned up the code a bit and made this easier to follow.

Take a look. I tested it with all of the databases listed at the top of the translator. I may have discarded some code necessary for older Primo versions, but I didn't find any databases to test on.