Fixed some bugs and changed some names.