Implement filament library
Move hooks to filament library