Streamlining; added tests for data integrity