This is incomplete as events etc are not implemented yet, but should suffice as a decent starting point Closes #27, but we should track this for new apps