Refactored to main / demo / test layout