Fixed some bugs, more to come