fixed bug and changed indentation style in period-dist example
improved Makefile