Move gophermap functions into own module