Removed complex-casting errors
Unittests, most of them failing