Faster JS on required inputs