Code Cleanup/Refactor