Clean Up Script Formatting

1) Merge some handy cleaning stuff from SM
2) Remove unused functions
3) Fix other minor formatting things

Signed-off-by: Chet Kener <Cl3Kener@gmail.com>