use the new profile class and remove unused code