Major refactoring in scms script, removed part for blog engine, reduced sed and echo usage to speed up