simplified interface and started to add some JS functionality