Reconstruct Codes

We were asked to reconstruct our codes, make it cleaner and readable. I watched the youtube videos and take look into array and classes. I get so confused with the use of class, where to put them, where to reference, where to assign their parameters.

Full Code Here:

1. What is the purpose of class? Seems like we can do everything with functions and objects
2. When I input class, I get confused on where to put it, reference it, and call it.
3. How to transparency an image?