Minimize using static methods
Remove unnecessary brackets
Update unit tests.

Signed-off-by: Hugues Peccatte <hugues.peccatte@gmail.com>