Further Main module cleanup