Fixed some bugs. Almost all.