change P matrix to K, makefile cleanup, using distortion params