Refactoring Custom view