Updated code base to python