some code optimization and new url rewriting
migrating to new url structure