Refactored some shit, I don't really know how to decrease the CPU usage while using a 50x50 matrix