Fixed some bugs and, of course, added others :D