Fixed some other bugs And added functionallity