minor updates in the readme about init() and some tidy ups on the JS lib