made an object checking method outside of all classes and implemented it in all methods. Also made list of points and directions for a ray hidden attributes