JS refactoring + added some answers + minor tweaks