Refactor Minor Code