Final cleanup

Move common function into shared file; comment Makefile.