Implement functions.
Added "__main__" field.
Added testing.
Fixed bug and errors in test files.
Used unittest for testing.
Merge pull request #2 from apua/apua

Apua