Update main.js

Deleted isEmpty() function