angularFire as a factory

implemented angularFire as a factory and corrected bugs related to
add/edit/remove