browserified version + some fixes