File main and functions
