Reverted changes to get rid of APR dependencies.