diff --git a/Setup.hs b/Setup.hs
--- a/Setup.hs
+++ b/Setup.hs
@@ -1,2 +1,4 @@
+#!/usr/bin/env runhaskell
+
 import Distribution.Simple
 main = defaultMain
diff --git a/Sound/Freesound/Sample.hs b/Sound/Freesound/Sample.hs
new file mode 100644
--- /dev/null
+++ b/Sound/Freesound/Sample.hs
@@ -0,0 +1,20 @@
+module Sound.Freesound.Sample (
+    Sample(..),
+    fromXML, listFromXML
+) where
+
+import Data.Maybe               (mapMaybe)
+import Sound.Freesound.Util
+import qualified Text.XML.Light as XML
+
+-- | A handle to a sample in the database.
+newtype Sample = Sample { sampleId :: Int }
+    deriving (Eq, Ord, Read, Show)
+
+-- | Read a 'Sample' from an 'XML.Element'.
+fromXML :: XML.Element -> Maybe Sample
+fromXML e = Sample `fmap` (findAttr "id" e >>= readMaybe)
+
+-- | Read a list of 'Sample's from an 'XML.Element'.
+listFromXML :: XML.Element -> [Sample]
+listFromXML = mapMaybe fromXML . findChildren "sample"
diff --git a/freesound.cabal b/freesound.cabal
--- a/freesound.cabal
+++ b/freesound.cabal
@@ -1,5 +1,5 @@
 name:               freesound
-version:            0.0.1
+version:            0.0.2
 synopsis:           Access the Freesound Project database
 description:        Access the Freesound Project database. The Freesound
                     Project is a collaborative database of Creative Commons
@@ -24,6 +24,7 @@
   exposed-modules:  Sound.Freesound
                     Sound.Freesound.Properties
                     Sound.Freesound.Query
+                    Sound.Freesound.Sample
   other-modules:    Sound.Freesound.URL
                     Sound.Freesound.Util
   build-depends:    base >= 3,
@@ -35,8 +36,6 @@
                     xml == 1.3.*
 
   extensions:       GeneralizedNewtypeDeriving
-  
-  ghc-options:      -O2 -funbox-strict-fields 
 
 executable freesound
   hs-source-dirs:   ., freesound
