Added test
Continued refactoring
Added new snippets and tests
Added test
Removed old methods
Changed resolving of references
Continued refactoring
Continued refactoring