Overall hardening of the code

- Overall hardening of the code
- Expansion of regression testing

Change-Id: Ib62aae644d85e47ee8c14fc8566556db413082aa
Signed-off-by: Reinaldo Penno <rapenno@gmail.com>