Fixing code standard issues.
Adds/modify some tests.