Fixed alot of minor bugs