Minor cleanup of code

Cleaned up code mostly for the spaceship code.