Code Refactor & Update