Add length check and add padding befor or after for string

Add length check for integer and bytes
Correct variables names
Add units tests