1. fixing whitespaces
2. returned to setting html from outerHTML
3. cleaning up firebase code