Added call to stored procedure Object_GetByFolderID
Various refactorings