clean up main script, fix update bug, move puppet update to main