You need to increase the amount of water you take out in water changes and how often, i also advise you get a "proper" filter like a fluval sponge one for the tank as this will help improve water quality. A UGF(under ground filter) can add oxygen to the tank but cannot cycle it- cycling a tank is a very important process in fish keeping and if you are to keep a ammonia and nitrite free tank you need to cycle it- you can read more up on cycling tanks in the beginner section in the pinned articles at the top and i suggest you read them
.
Ammonia should be 0 and can be brought down via water changes, nitrites should also be 0 in an established tank but can start to show in a tank that is going through a mini cycle, which you should try to find the cause of asap. Nitrates should be 40 or under and adding live plants to the tank will help lower them as the lower they are, the better.
Do not raise or lower ph, your guppys don't need it as they can live in a very wide range of ph's and it is causing them alot of stress by changing it, it will also be contributing to their discomfort in the water.
The flicking and rubbing is most likely due though to the ammonia in the water, which is a toxin primarily produced by fish poo and waste in the tank like uneaten food or rotting plant leaves and is very poisonus to fish- 0 is the best number and as before mentioned, can be brought down by doing regular water changes. When you cycle a tank, you are basically growing good bacteria in the filters sponge which can break down ammonia and nitrites(which are poisonus, even lethal, to fish)- you cannot have a truly healthy tank until it is cycled.
To cycle a tank you need a proper filter and dechlorinator- dechlorinator removes chlorine and other harmful chemicals in tap water to fish and allows the good bacteria in the filter to grow.
In a cycled tank, you should be doing at least a 30% water change per week with dechlorinator, but due to your ammonia readings i suggest you do a 50% water change now with dechlorinator followed by a 30% one every day after that until ammonia is back to 0.
If your tank is not cycled(i.e it has nitrites) and i suspect it is not, i suggest you do a 100% water change right now with dechlorinator and buy a sponge filter and start to cycle the tank as it will improve your fish's health and life expectancy in the long run alot and make them healthier fish.
Do not add salt to the tank as the guppys don't need it at all and will not improve their condition, the best thing you can do right now is do lots of water changes and buy a proper tank filter and read up on cycling tanks
.