some refactoring plus some updates in Protein class