Adding ptest and more project structure.
Breaking up long lines in ptest.
Renaming prefix index to position index.
Refactoring logic