Added peak alignment, inverted input flag