Documentation and dependency fixes

This PR contains some documentation and dependency fixes. I placed the array dependencies on various functions where they were required because you'd eventually run into an exception anyway. Best to catch them as soon as possible.