Some refactoring and added stripping options