Bunch of changes after some review.