Fix check mandatory fields.
Some refactoring
Fix a doc block
Fix docblocks - and functionality :P
Update unit tests
Merge pull request #3 from elkuku/check-mandatory

Fix check mandatory fields.