Move overall setup to top and other minor edits