Fixed WP_DEBUG errors
Altered function names to be more logical