Added flatten tool
Added "make flat" option
Improved setup and flatted script appearance