Clean up of code and small tweaks for GitHub upload