Whitespace stuff for consistency
Minor refactoring of js file
js: don't try to match against input name if name not present