Fixed some bugs and changed minor details.