I have two questions regarding removing and reducing polygons:

Is there a way to reduce the number of polygons/triangles by specifying an angle? I have found the function that can reduce the number of polygons to say 50%, but I would like to be able to combine polygons that has an angle of say 180 (+/5) degrees, considering them to be flat. Is there a way? Is there a script?

Is there any script out there that can remove hidden surfaces? Let’s say I create a cube and inside the cube is a number of polygons that can not be seen (assuming nothing is transparent, and that the camera is outside the cube). Is there a script that can find such hidden polygons and remove them?
Thanks!