Python: refactored 3D engine out of main into new class EA3D