bug fix - ' was not being handled in sample type names

Includes style fixes suggested by intelliJ