Refactored JS validation a bit