Refactored demos - removed redundant code.