Cleaned up main.d