Switched define statments for better dependency mgmt
Squashed circular dependency bugs