Some refactoring & improvements + sourcemap.
Bump version to 1.1.2