split clientside js into modules for factoring