Added check for fragment equality. go fmt
Moved emptyTime to where it is used.
go fmt
go fmt and error handling