All functions for handling data.

datahandling