added service for reading and writing config values and directive to simplify usage