Separated some global functions -> new file