Refactored available presence handler
Refactored parsing caps