Slightly improved Child Theme support

Wrapped functions with if function_exists to make sure that they can be
overwritten by Child Theme