put javascript interface and data logic in separate js files