When you say swimming in a corkscrew fashion do you mean spiralling through the water, like barrel rolling so the fish is rolling over and over again. Or do you mean swimming in the same spot moving in an S shape but not really getting anywhere?
If it's the former, spiralling, then it is usually a problem in the brain. Quite often protozoans get into sick fish and end up in their head. Then they can infect the brain and cause unusual behaviour.
If it's swimming in an S shape then it is called shimmying.
Both of these are caused by poor water quality and dirty environmental conditions, (dirty gravel & filter). The shimmying can also be caused by low mineral content in the water.
The best thing to do is clean up the tank conditions, do gravel cleans and partial water changes every day for a week. Increase surface turbulence to maximise oxygen levels in the water and increase the general hardness of the water. The harder water is better for the livebearers, and bacteria & fungus don't do as well in hard water. They still live in it but don't do as well compared to soft water.
You can try treating with something like Waterlife Protozin but clean the tank up first. And be careful with it because the stuff kills catfish and loaches if you overdose.
I would probably just treat the quarantine tank with the mollies in that. And just clean the main tank up with water changes and gravel cleans.
If the problem is protozoan then it can affect any fish in the tank. Shimmying usually only affects livebearers but is an indication the tank isn't suitable for them and they are under stress.
Check the general hardness of the water, and if necessary increase it to about 200ppm.
How do you clean the filter? I ask because you have an ammonia and a nitrite reading and the tank has been set up for a year. Do you wash the filter media out under tap water? Have you replaced any of the media with new stuff? Is the filter run continously?
You should only wash out the filter materials in a bucket of tank water. Never wash them under tap water.
If you have a power filter the motor and filter casing can be washed under tap water.
Try not to clean the filter on the same day you do water changes.