Cleaned up code and removed relic nodes