I think you should pay more attention to some concepts of Object Oriented Programming.
For example, the game Pong has one ball and two paddles, so you could create a Ball class and a Paddle class. This way, all the logic concerning these two entities would be encapsulated within their classes.
You could also create a manager class that maintains the game main loop and a class responsible for drawing entities on screen (
Separation of Concerns). This way, your code would be more readable and maintainable.
Of course, you will have to think a bit to figure out how to organize all the information, but it's worth it.