Move functions w/in doc-ready func