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

I'm not sure what you mean. The code does the same thing as before.