Added profile option to makefile
Changed how averaging works

It now takes 10 values between the outputs, a bit worse for performance but
will work better with SIGSTOP and SIGCONT later.