Fixed bug in replying with media, and refactored methods.