Fixed some bugs
Fixed some bugs added a few features