Moved JS into firebase interface lib file