Fixed most bugs, more to come