Impement the last missing parts in uprg (writting to file), make Makefile more flexible.