reorganize code, fix memory leak from missiles