Add tests
Add some fields
fix php 5.5 compatibility