Added assertion
Pass in an array of the correct size
Removed now unused CopyLoader
Better exception handling for SegmentLoader
Pass in line start correctly
Updated comment
Use java helper methods