liblight: Add implementation