Reworked back button service and directive.