Fixing #697
Compacting and adding source map
Fixing #676 & #574