Updated packages & refactored sample code