             archiveEnd = archive.offset + archive.size
             bytesBeyond = (myOffset + packedString.length) - archiveEnd
 
-            #console.log 'APA3'
-            #fh.seek(myOffset)
             if bytesBeyond > 0
-                # FIXME fh.write( packedString[:-bytesBeyond] ) # Everything but not last bytesBeyond
-                #console.log 'APA4'
                 fs.write fd, packedString, 0, packedString.length - bytesBeyond, myOffset, (err) ->
                     cb err if err
-                    #console.log 'APA4.1'
                     assert.equal archiveEnd, myOffset + packedString.length - bytesBeyond
                     #assert fh.tell() == archiveEnd, "archiveEnd=%d fh.tell=%d bytesBeyond=%d len(packedString)=%d" % (archiveEnd,fh.tell(),bytesBeyond,len(packedString))
                     # Safe because it can't exceed the archive (retention checking logic above)
                     fs.write fd, packedString, packedString.length - bytesBeyond, bytesBeyond, archive.offset, (err) ->
                         cb err if err
-                        #console.log 'APA4.2'
                         callback()
             else
-                ## FIXME ALL THIS SHIT IT IS A looping, ARGH WTF
-                #console.log 'APA5'
-                #console.log 'ps', ps
-                #console.log 'packedString', packedString
                 fs.write fd, packedString, 0, packedString.length, myOffset, (err) ->
-                    #console.log "HELLO?"
                     callback()
 
         async.forEachSeries packedStrings, writePackedString, (err) ->
             throw err if err
-            console.log 'Propagating to lower...'
             propagateLowerArchives()
-
 
         propagateLowerArchives = ->
             # Now we propagate the updates to lower-precision archives
             higher = archive
             lowerArchives = (arc for arc in header.archives when arc.secondsPerPoint > archive.secondsPerPoint)
-            console.log 'prop1'
 
             if lowerArchives.length > 0
                 # Collect a list of propagation calls to make
                 # This is easier than doing async looping
                 propagateCalls = []
-                console.log 'prop2'
                 for lower in lowerArchives
                     fit = (i) -> i - i.mod(lower.secondsPerPoint)
                     lowerIntervals = (fit(p[0]) for p in alignedPoints)

            currentArchive = header.archives[currentArchiveIndex]
            currentPoints = []

            console.log 'HEJ'
            updateArchiveCalls = []
            for point in points
                age = now - point[0]

archiveInfoFormat = "!3L"
archiveInfoSize = pack.CalcLength(archiveInfoFormat)

unixTime = -> parseInt(new Date().getTime() / 1000)

create = (filename, archives, xFilesFactor, cb) ->
