Fixed some bugs and added some new things