diff --git a/brok.cabal b/brok.cabal
--- a/brok.cabal
+++ b/brok.cabal
@@ -1,6 +1,6 @@
 cabal-version: 1.12
 name: brok
-version: 0.1.3.0
+version: 0.1.4.0
 license: BSD3
 license-file: LICENSE
 copyright: 2019 Small Hadron Collider
diff --git a/src/Brok/Parser/Attoparsec.hs b/src/Brok/Parser/Attoparsec.hs
--- a/src/Brok/Parser/Attoparsec.hs
+++ b/src/Brok/Parser/Attoparsec.hs
@@ -8,7 +8,7 @@
 import Data.Attoparsec.Text
 
 lexeme :: Parser a -> Parser a
-lexeme p = many' space *> p <* many' space
+lexeme p = skipSpace *> p <* skipSpace
 
 tchar :: Char -> Parser Text
 tchar ch = singleton <$> char ch
@@ -16,11 +16,14 @@
 chopt :: Char -> Parser Text
 chopt ch = option "" (tchar ch)
 
+manyChars :: Parser Char -> Parser Text
+manyChars p = pack <$> many1 p
+
 concat3 :: (Monoid a) => a -> a -> a -> a
 concat3 t1 t2 t3 = concat [t1, t2, t3]
 
-concat4 :: (Monoid a) => a -> a -> a -> a -> a
-concat4 t1 t2 t3 t4 = concat [t1, t2, t3, t4]
+concat5 :: (Monoid a) => a -> a -> a -> a -> a -> a
+concat5 t1 t2 t3 t4 t5 = concat [t1, t2, t3, t4, t5]
 
 surround :: Char -> Char -> Parser Text -> Parser Text
 surround open close parser = concat3 <$> tchar open <*> parser <*> tchar close
diff --git a/src/Brok/Parser/DB.hs b/src/Brok/Parser/DB.hs
--- a/src/Brok/Parser/DB.hs
+++ b/src/Brok/Parser/DB.hs
@@ -10,17 +10,10 @@
 import Data.Attoparsec.Text
 
 import Brok.Parser.Links (url)
-import Brok.Types.Link
+import Brok.Types.Link   (URL)
 
 line :: Parser (URL, Integer)
-line = do
-    lnk <- url
-    _ <- char ' '
-    int <- many1 digit
-    _ <- char '\n'
-    case readMay int :: Maybe Integer of
-        Just i  -> return (lnk, i)
-        Nothing -> fail "Unable to parse timestamp"
+line = (,) <$> (url <* char ' ') <*> (decimal <* endOfLine)
 
 entries :: Parser [(URL, Integer)]
 entries = many1 line
diff --git a/src/Brok/Parser/Links.hs b/src/Brok/Parser/Links.hs
--- a/src/Brok/Parser/Links.hs
+++ b/src/Brok/Parser/Links.hs
@@ -16,19 +16,30 @@
 
 type Token = Maybe URL
 
+preQueryChars :: String
+preQueryChars = "-._~:/#%@"
+
+queryBodyChars :: String
+queryBodyChars = "-._~:/#%@!$&*+,;="
+
+chars :: String -> Parser Char
+chars chrs = digit <|> letter <|> choice (char <$> chrs)
+
 -- parentheses
 parens :: Parser Text -> Parser Text
 parens parser = surround '(' ')' parser <|> surround '[' ']' parser
 
 -- urls
-urlChar :: Parser Char
-urlChar = digit <|> letter <|> choice (char <$> "-._~:/?#%@!$&*+,;=")
+part :: String -> Parser Text
+part str = concat <$> many' (parens (part str) <|> manyChars (chars str))
 
-urlChars :: Parser Text
-urlChars = concat <$> many1 (parens urlChars <|> (pack <$> many1 urlChar))
+query :: Parser Text
+query = (++) <$> string "?" <*> part queryBodyChars
 
 url :: Parser Text
-url = concat4 <$> string "http" <*> chopt 's' <*> string "://" <*> urlChars
+url =
+    concat5 <$> string "http" <*> chopt 's' <*> string "://" <*> part preQueryChars <*>
+    option "" query
 
 noise :: Parser Token
 noise = anyChar >> return Nothing
diff --git a/src/Brok/Parser/Options.hs b/src/Brok/Parser/Options.hs
--- a/src/Brok/Parser/Options.hs
+++ b/src/Brok/Parser/Options.hs
@@ -38,7 +38,7 @@
 ignoreP = lexeme $ Ignore <$> (string "--ignore" *> char '\n' *> many1 urlP)
 
 fileP :: Parser Text
-fileP = lexeme $ pack <$> many1 (notChar '\n')
+fileP = lexeme $ manyChars (notChar '\n')
 
 optsToConfig :: [Option] -> Config
 optsToConfig = foldl' convert defaultConfig
diff --git a/test/Parser/DBTest.hs b/test/Parser/DBTest.hs
--- a/test/Parser/DBTest.hs
+++ b/test/Parser/DBTest.hs
@@ -42,12 +42,15 @@
                         ])
                    (db content))
         , testCase
-              "big file"
+              "big file (last)"
               (assertEqual
                    "Gives back final url"
                    (Just
                         "https://developmentarc.gitbooks.io/react-indepth/content/life_cycle/the_life_cycle_recap.html")
                    (fst <$> (lastMay . fromRight [] $ db big)))
+        , testCase
+              "big file (length)"
+              (assertEqual "Gives back length" 142 (length $ fromRight [] (db big)))
         , testCase "invalid .brokdb" (assertEqual "Parse error" True (isLeft $ db invalid))
         , testCase "parses empty" (assertEqual "Gives back empty array" (Right []) (db ""))
         ]
diff --git a/test/Parser/LinksTest.hs b/test/Parser/LinksTest.hs
--- a/test/Parser/LinksTest.hs
+++ b/test/Parser/LinksTest.hs
@@ -42,6 +42,15 @@
                          (Right ["https://google.com"])
                          (links "https://google.com"))
               , testCase
+                    "just long link"
+                    (assertEqual
+                         "Gives back full URL"
+                         (Right
+                              [ "https://developmentarc.gitbooks.io/react-indepth/content/life_cycle/the_life_cycle_recap.html"
+                              ])
+                         (links
+                              "https://developmentarc.gitbooks.io/react-indepth/content/life_cycle/the_life_cycle_recap.html"))
+              , testCase
                     "http link with surrounding text"
                     (assertEqual
                          "Gives back google.com"
@@ -63,6 +72,13 @@
                     "link with brackets"
                     (assertEqual
                          "Gives back google.com"
+                         (Right ["https://en.wikipedia.org/wiki/Word_(computer_architecture)"])
+                         (links
+                              "[A link](https://en.wikipedia.org/wiki/Word_(computer_architecture))"))
+              , testCase
+                    "link with brackets in query"
+                    (assertEqual
+                         "Gives back google.com"
                          (Right ["http://google.com?q=(fish)"])
                          (links "[A link](http://google.com?q=(fish))"))
               , testCase
@@ -91,6 +107,12 @@
                          "Gives back google.com"
                          (Right ["http://google.com?q=fish"])
                          (links "'http://google.com?q=fish'"))
+              , testCase
+                    "link with comma on end"
+                    (assertEqual
+                         "Gives back google.com"
+                         (Right ["http://google.com"])
+                         (links "testing http://google.com, here"))
               ]
         , testGroup
               "multiple links"
