Refactored compare.js to use a makeshift 'spaceship' operator, simplified sendAction in component.js

too many spaces