isolated laravel specific implementation details to a service provider; misc fixes