The question is too long, will post it in details.