Nicer loading message + minor changes

Abstract out 'loading message' overlay.
Check value before try to replace (was giving exception in console)
Minor tabbing / commenting out console.log