Functions moved into a separate file, to be able to include them easily