Refactor get_content()