Code cleaned up and python testwq