Fixed error with entries_by_cls entries being overwritten
Also fixed pyx implementation
Merge pull request #38 from bluepeppers/entities_by_cls_fix

Fixed error with entries_by_cls entries being overwritten