consolidating javascript into base