merged Sinatra models, tables and views with original JavaScript