Moved go package functions into separate file.