standardized some JS stuff