first version of JSManager
cleanup