Javascript architect helper