fixed order history initial load on firebase, minor refactors