Added a lot of things and fixed bugs