fixed some bugs and added preliminary code for missiles