Changed some things around, fixed some bugs.