[cs] add license to composer
[cs] remove unused imports, update annotations
refactor page like detection to service, add snippets doc