Scripts: Add missing code and fix codestyle