Refactored symbols.py. Added unit tests.