Added some tests. Updated style to match PEP-8.