debugged profile integration and python bindings for profiles