Fixed some bugs and created new ones.