Adding getFreeInputs() and cleanup test.cpp
Support for protocol 79 (0.28.pre)