Fix package name
Refactor to be more idomatic javascript, fix chrome detection