Load main.js after all the other JS files
Compare alarms to the time argument of poll0 instead of Date.now()
Return -1 if getMIDlet0 fails
Convert code to 4-spaces indentation
Store alarms and push notification registrations in the same array