Add comment and clean up implementation on findAllReferences
Add test cases and rename test files