Refactor configuration tree

Depends on HaxeBeluga/Beluga#112