Updated demo to be outside the source. Refactoring demo to use objects