Neither is correct, because neither is a complete sentence. You need either: The main purpose of this is to make it look cleaner and more elegant, or: The main purpose of this is to not only make it look cleaner and more elegant, but also ....
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.