Refactored symbol table
Tests for pattern definition added; Recursive pattern call detection added