Cleaned up file naming/organization, optimized some things like using preallocated indexed slices instead of appends, etc.