Cleaned up Document Controller