Refactored into components
Added initial directive