Changed app to use OO approach