Modularized and more features added