Working fade out loader
Restructure as javascript app