Made a few changes. Fixed some bugs...