move Scope object to separate source file