cleanup and formatting
Integrated v 2.0 into this module