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

ah i misread, good job