Fixed circular reference and added test.
Removed Main.