Modify data types and specs to resolve all dialyzer errors and warnings; adjust tests appropriately