You should try to change your mindset, when I was trying while saying to myself "I must not do this" I always ended up failing after 1 or 2 weeks. Now I just tell myself everyday, it's so cool I managed to quit P and M, I don't need to think about avoiding relapse because M or watching P are simply not an option anymore.