Refactored

Fixed some commands to work with older Firefox