Removed compiled python and removed some nested ifs