structure js into modules