Review functions on bottom and make them as static if possible.
Some minor fix.