fix some problems due to merge and add test for internal storage
add test files for testing