Cleanup of the main file; can now operate on commands properly.