Restructuring, self-test redesigned as separate mode.
Merge branch 'master' of github.com:grepz/bpirate-cl