added source-map, fixed more bugs