Fixed some bugs and did some feature stuff