added affinity.sh and some file templates