Refactor the SampleActivity

Signed-off-by: Umair Khan <omerjerk@gmail.com>