Changed to better way of overriding document if needed
0.4.5