refactoring installprofile and then attempting to clean up registration