deb and tests added, some bugs fixed