[Fixed #4] Move all data verifications inside respective functions.
Merge pull request #6 from rtnpro/move_assertions

[Fixed #4] Move all data verifications inside respective functions.