Committed on 13 June 2014. Major changes done in this commit.