Fix bugs and stuff