Refactor code: using absolute imports
Add test for identify function