Small changes to demo script
Added speed of sound c to subfunctions