Better coding style
Remove not used imports
Missing requirement
Factor out presence response parsing