Moving permanent functions into include file

also loading jquery from cdnjs now