Initial refactor
Initial refactor
Fixed returning the scope