Adds p6. Adds test file. Adds requirements.txt. Code cleanup.