Refactoring dynamic refs
Refactoring components to be stateless