Fixed several problems, still not sure what's wrong with those commands at the bottom