add documentation
remove duplicate code in table creation
optimize imports
reduce memory usage when pulling segments