Remove .pyc from gitignore, add some tests for many-to-many relationship to ensure it is working