Refactoring, and implementing into demos