Refactoring and Add Samples