refactoring scripts and styles