EPG Handling and some shared_ptr cleanup