add common constants, refactor chrome control directive