main.hasElement and others changes...