Added profile_id to comments
Added some more sanity checks
Small changes