Refactored scope, render and search