Updated to latest application and library

Includes flush end bugfix and configurable sensitivity
Added test suite for library