Profile API, PHP <5.4 backwards compatibility, route fixes