Refactored a little to hookup to jalview