refactored alignment for LIS but not happy with it
refactored alignment to be more generic
fixed a few bugs