Basic js architecture