Merged ProfileSession and Session, fixed minor bugs