Split files in functions and main. Added timer between levels