Added data management function to base controller.
minor fixes