I removed all uses of trigonometric functions and replaced it with simple vector math instead. I also removed the particles acting on the black hole as theoretically their mass is so high it doesn't change anything. And finally, I changed distance to distance squared as Newton's equations require it.