cleaned up code
added firebase connection