Slightly better javascript