Custom preloader based on idea and code from Pathfinder Development