After hours and hours of coding and hard work, I think I have come up with a solution.

Happy New Year!