Eliminate circular dependencies

[Close #200] [Issue #199]