Javascript architectural framework