started removing some code, initial support for profiles